﻿using System.Web.Optimization;
using ScrumPilot.Helpers;

namespace ScrumPilot.App_Start
{
    public class BundleConfig
    {
        // Pour plus d’informations sur le Bundling, accédez à l’adresse http://go.microsoft.com/fwlink/?LinkId=254725 (en anglais)
        public static void RegisterBundles(BundleCollection bundles)
        {
            //bundles.UseCdn = true;
            //bundles.ResetAll();
            BundleTable.EnableOptimizations = true;

            bundles.Add(new Bundle("~/Commons/", new JsMinify()).IncludeDirectory("~/Scripts/Commons", "*.js", true));

            bundles.Add(new Bundle("~/TasksList/", new JsMinify()).Include(
                "~/Scripts/jquery.jeditable.min.js",
                "~/Scripts/jquery.autogrow.js",
                "~/Scripts/jquery.jeditable.autogrow.js",
                "~/Scripts/jquery.multiselect.js",
                "~/Scripts/jquery.multiselect.filter.js"));

            bundles.Add(new Bundle("~/Index/").Include(
                "~/Scripts/jquery.unlimitedscroll.js",
                "~/Scripts/highcharts.js",
                "~/Scripts/Index.js"));

            bundles.Add(new Bundle("~/Graph/").Include(
              "~/Scripts/highcharts.js"
            ));

            var cssBundle = new Bundle("~/Content/css", new CssMinify()).Include("~/Content/ScrumPilot.less",
                                                                                 "~/Content/Normalize.css",
                                                                                 "~/Content/site.css");
            cssBundle.Transforms.Add(new LessTransform());
            bundles.Add(cssBundle);
            BundleTable.Bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap*").Include("~/Scripts/bootmetro*"));
            BundleTable.Bundles.Add(new StyleBundle("~/Content/bootstrap").Include("~/Content/bootstrap.min.css"));


            bundles.Add(new Bundle("~/Content/bootmetro1", new CssMinify()).Include("~/Content/BootMetro/bootmetro.css",
                                                                                     "~/Content/BootMetro/bootmetro-tiles.css",
                                                                                     "~/Content/BootMetro/bootmetro-charms.css"));


            cssBundle = new Bundle("~/Content/bootmetro2", new CssMinify()).Include("~/Content/ScrumPilot.less",
                                                                                   "~/Content/BootMetro/metro-ui-light.css",
                                                                                   "~/Content/BootMetro/icomoon.css");
            cssBundle.Transforms.Add(new LessTransform());
            bundles.Add(cssBundle);

            cssBundle = new Bundle("~/Content/TimeLine", new CssMinify()).Include("~/Content/ScrumPilot.less",
                                                                                "~/Content/TimeLine.css");
            cssBundle.Transforms.Add(new LessTransform());
            bundles.Add(cssBundle);
        
        }
    }
}